package com.javabean;

import java.util.List;

public class Page<T> {
    private Integer pageNum;//当前页码
    private Integer pageTotal;//总页码
    private Integer pageSize = 4;//每页显示数量
    private Integer pageTotalCount;//总记录量
    private List<T> items;//每页的数据内容

    public Integer getPageSize() {
        return 4;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = 4;
    }

    public Page(Integer pageNum, Integer pageTotal, Integer pageSize, Integer pageTotalCount, List<Book> items) {
        this.pageNum = pageNum;
        this.pageTotal = pageTotal;
        this.pageSize = pageSize;
        this.pageTotalCount = pageTotalCount;
        this.items = (List<T>) items;
    }

    public Page() {

    }


    @Override
    public String toString() {
        return "Page{" +
                "pageNum=" + pageNum +
                ", pageTotal=" + pageTotal +
                ", pageSize=" + pageSize +
                ", pageTotalCount=" + pageTotalCount +
                ", items=" + items +
                '}';
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(Integer pageTotal) {
        this.pageTotal = pageTotal;
    }

    public Integer getPageTotalCount() {
        return pageTotalCount;
    }

    public void setPageTotalCount(Integer pageTotalCount) {
        this.pageTotalCount = pageTotalCount;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<Book> items) {
        this.items = (List<T>) items;
    }


}
